const pageCtr = require('../controller/pageCtr')

module.exports = (req, res) => {
  let myPath = req.url;
  let newPath = myPath.split('.');
  if (newPath[1] == "html" || newPath[1] == "css" || newPath[1] == "js") {
    pageCtr.sendHTML(req, res)
  }
  else if (newPath[1] == "jpg") {
    pageCtr.sendImage(req, res)
  }
  else if (newPath[1] == "ico") {
    pageCtr.sendIco(req, res)
  }
}